﻿/**************************************************************
 * Description:
 * AITReceivementBListUIModelAction.cs
 * Product: U9
 * Co.    : UFIDA Group
 * Author : Auto Generated
 * version: 2.0
 **************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.IView; 
using System.Data;
using UFIDA.UBF.Query.CommonService;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.ControlModel;
using UFIDA.UBF.Query.CommonService.QueryStrategy;
using UFIDA.UBF.Query.CaseModel;
using UFIDA.U9.UI.PDHelper;
using UFSoft.UBF.ExportService;

namespace UFIDA.U9.CUST.AITReceivementBListUIModel
{
	public partial class AITReceivementBListUIModelAction : BaseAction
	{
		private static readonly ILogger logger = LoggerManager.GetLogger(typeof(AITReceivementBListUIModelAction));
		//强类型化基类Model属性.
		public new AITReceivementBListUIModelModel CurrentModel 
		{
			get {
				return (AITReceivementBListUIModelModel)base.CurrentModel;
			}
			set {
				base.CurrentModel = value ;
			}
		}
		
		public AITReceivementBListUIModelAction(IPart part) : base(part)
		{
		}
		//Model参数的构造,用于测试用例.
		public AITReceivementBListUIModelAction(AITReceivementBListUIModelModel model) : base(model)
		{
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnLookCase(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnLookCase_Extend);
		}
		private void OnLookCase_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:QryClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("QryClick",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnCaseChanged(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnCaseChanged_Extend);
		}
		private void OnCaseChanged_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	        QryService.OnCaseChangedDefault("DDLCase", this.CurrentPart);
		QueryAdjust();
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnOutPut(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnOutPut_Extend);
		}
		private void OnOutPut_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnOutPut
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnOutPut",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnGridRowDbClick(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnGridRowDbClick_Extend);
		}
		private void OnGridRowDbClick_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnNew(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnNew_Extend);
		}
		private void OnNew_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnPrint(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnPrint_Extend);
		}
		private void OnPrint_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnPrint
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnPrint",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnDelete(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnDelete_Extend);
		}
		private void OnDelete_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:ListDeleteClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("ListDeleteClick",this,sender,e);

	  
		}
		#region Action的内置两个Action.
		/// <summary>
		/// Help: 数据加载(发生在Form的初始化加载时)
		/// </summary>
		public void OnLoadData(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnLoadData_Extend(sender,e) ;
		}
		private void OnLoadData_DefaultImpl(object sender, UIActionEventArgs e)
		{
		   
		     InitCaseModel();
				}
		/// <summary>
		/// Help: 数据收集(发生在Form的CallBack或者是PostBack时)
		/// </summary>
		public void OnDataCollect(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnDataCollect_Extend(sender,e) ;
		}
		private void OnDataCollect_DefaultImpl(object sender, UIActionEventArgs e)
		{
		    UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DataCollect",this,sender,e);
		}
		#endregion
         

            
        #region BE列表自动产生的代码
        
		public void QueryAdjust()
		{
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;

			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.PM.Rcv.Receivement", "4460e26c-064d-44eb-b985-dd0992580af4", UIGrid.UIView, UIGrid, 1);

			beQryStrategyImpl.Adjust();
		    
			AfterQryAdjust_Extend(UIGrid);

			UIGrid.UIView.CurrentFilter.OPath = CustomFilterOpath_Extend(QryService.GetDefaultOpath((BaseWebForm)(this.CurrentPart)));
			UIGrid.UIView.CurrentFilter.OrderBy = QryService.GetOrderByOpath((BaseWebForm)(this.CurrentPart));

			UIGrid.UIView.Clear();
			this.NavigateAction.FirstPage(null);

			//20090316 UBF2.9_查询_yzx_修改查询设计器的tpl_用于显示多webpart查询的IE状态栏提示信息
			QryService.ShowQueryInfoInIEStatusBar((BaseWebForm)this.CurrentPart, UIGrid.UIView);
		}

		public void InitCaseModel()
		{
			QryService.ClearSession((UFSoft.UBF.UI.FormProcess.BaseWebForm)(this.CurrentPart));
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;
			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.PM.Rcv.Receivement", "4460e26c-064d-44eb-b985-dd0992580af4", UIGrid.UIView, UIGrid, 1);
			beQryStrategyImpl.QueryComponentXMLCompressed = @"7VbNbhs3EHYvvfTYFxD2TpnkklwSiBPYUgwIsGPHtnLnzzBRu9IKq5VjH3NqUSBIgSDpD4oWPfTY
ILcWRYu+TOSiT9HOaq3WlhPHAXL0XLgccvjNfDMc7soHKysr/6DUYy0f1h9/fnzj1tEwbx1CORkU
o7WEtWnSgpEvwmB0fy2ZVpHo5NbNG3enUB53iuG4GMGoag3CWmJiNOCjJJoGQ0TGU2KiA8IEgNBM
RG9l0hrZIawl672DPfAwOIQhmm8NJlXSCoPJOLfHd968ASa+HIyruWNJ6wHk43qcu3JwPEarZt9c
0d/rrSVCKApceUKVCEQIcMQZLUkI1BguNbVRnO7fL6alh81pnjcO9Dd73fV237R3t9t7/rB9xpuk
1e/dG8DDbmnvN7j1V7d4OEpaexB7o1hsFTY0Sx3rH0By88aGnQx8vTTnKlDOqXeReBVSIqh0xHjL
iRQeWQrCM/iPqyVm3sgDQh8Un8Jct1cUVRe3dYpRBUfVPZtP56abg7yC8sC6e4PJwOWoOyinkLQ6
RT4dji7q94uyuqhtTrl9NLajsAWHkK8l6eKMZW19wrJuFenYPWVqTofiXAXpI+HRWSJ0VEQHrB+Q
TGE1cdAyvisdu2XxCfiq1z0z2bXVg3q6sdurYNgsbezujKG0tXmj6B7sLFbW72O6u3l+ZoYnHR3X
cwyi3zsbhBZKeWcYkSCx/pkXRFuRkhgyLl1qeGTvnNPLguj3tosA+SKSiKheGEsMSIEcCkoMF4ow
7rIgFZiMsdposyiHCxtvIIMYMxKF1ViG0aC1AeIy6QKz0TvK/wdCA0cjQFSGMByJSFVKNDeOhEx4
qmOWWe3m1HQh2mledewETmu/KZrJudmcN++NjrXPeIIkwmaWOBliTZ4XPIIJUi946xb+TrFE3uzx
s5PHL/76/fnsyS9vJHL1Im6KsWA8kaTRYnMArDcnWUooeG2scTwau8DdmE4GI5hMuraCJfhXv347
++LHk69+Ovnuh3eBz6KhNGDECjTCW4+Z49oSmWpg1inrRFjAYwPaqvHb88RhwTUf3SVXTp5/M3v6
6DInVs+nYpGl+c3FefPRdHNKpTAmYl/ynIggsDRCZoj0Gi8qtnOl1fvIyhlImabY+oyugRAy0kgs
QCAqNTQVkKZBmfeYkDPIGUsxF0qRjNGMCMUFPl2ZJoFTFlOwHJPytly0O3hJXpOQK4efZiFj9TtF
g2T4WDlGMAmK+JAp53jKFX27EzXuciaePpp9+fiKToTAQuDYhIOKngiJ+JoHQZjGd1MwxTArF5xY
L0t8Gu9Wx/v9ZewX388+f3ny7OXfnz25ogfOR2pZ5MQpVb/Z+C9hHaV1Y5JOGeWlYRc82K+KEvo7
26+N/7ens5+/xnp89celLKwu34bTef2C4awemj6vuc6kBWx6HvsVtk5ijcAeaHhqbaAeHF842CkB
CzTsjK7a8OcPbvNPcXu/c86vUz9Wz7XW1fM/Yjc/WrmWa7mWa7mWa7lE/gU=";
		    
			BeforeGetQryModel_Extend(beQryStrategyImpl);
		    
			CaseModel caseModel = beQryStrategyImpl.GetQryModel();
		    
			AfterGetQueryModel_Extend(caseModel);
		    
			QryService.SetCaseModelToSession((BaseWebForm)(this.CurrentPart), caseModel);
		}
        
        
         #endregion
         

	}
}
